package com.itheima.d5_resource;

/*
     目标：认识try-catch-finally。
 */


public class Test1 {
    public static void main(String[] args) {
        int result = rely();
        System.out.println("最后：" + result);
    }

    public static int rely() {
        try {
            int a = 10 / 0;
            System.out.println("代码正常");
            return a;
        } catch (Exception e) {
            System.out.println("异常 -- " + e.getMessage());
            return 88;
        } finally {
            System.out.println("finally");
            return 44;
        }
    }

}
